#ifndef __PID_H__
#define __PID_H__

#include "main.h"

typedef struct 
{
	float SetValue;		//????????????????
	float GetValue;		//??????????????????????
	
	float T; 			//PID ????????????????
	float Kp; 			//???????
	float Ti; 			//???????
	float Td; 			//??????
	
	float EK; 			//???????
	float EK_1; 		//??????
	float SigmaEK;		//?????????
		
	float Pout;			//??????????
	float Iout;			//??????????
	float Dout;			//?????????
	
	float Out0;			//???????????
	
	float Out; 			//??????????
	
	unsigned int PIDCounter; //PID?????????
	unsigned int PWMCycle; 	 //PWM????
}PID_Struct;

void Motor_Angle_PID_Init_Left(void);
void Motor_Angle_PID_Cal_Left(void);
void Motor_Angle_PID_Init_Right(void);
void Motor_Angle_PID_Cal_Right(void);

#endif
